home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / AMOS compiler.adf / Examples / Screen_Slide.AMOS / Screen_Slide.amosSourceCode < prev   
AMOS Source Code  |  1991-06-13  |  1KB  |  44 lines

  1. '
  2. '
  3. ' Screen Slide Demo By Gary Symons.
  4. ' (c) Europress Software Ltd.
  5. '  
  6. ' Shows the speed of the new screen copy routine 
  7. ' that's part of AMOS 1.3. It's twice as fast as the previous version!   
  8. '
  9. ' Note:To take full advantage of the new screen copy routine,  
  10. '      keep the starting x pixel and width of the block divisible by 16.   
  11. '      This is not as limiting as it sounds. By clever use of screen   
  12. '      offsets and screen copies , scrolling games such as those made with 
  13. '      TOME will be twice as fast as before! This method is used by top    
  14. '      commercial games. 
  15. '
  16. '
  17. Hide 
  18. Unpack 5 To 1
  19. Screen Hide 1
  20. Screen Open 0,320,200,32,Lowres
  21. Flash Off : Curs Off : Cls 0
  22. Wait Vbl 
  23. Get Palette 1
  24. Colour Back Colour(0)
  25. View 
  26. Wait Vbl 
  27. Y1=199
  28. Y2=200
  29. Timer=0
  30. Do 
  31.    Y3=0
  32.    Do 
  33.       Screen Copy 1,0,Y1,320,Y2 To 0,0,Y3
  34.       Inc Y3
  35.       Exit If Y3>Y1
  36.    Loop 
  37.    Dec Y1
  38.    Dec Y2
  39.    Exit If Y1<0
  40. Loop 
  41. Locate 0,10
  42. Centre "Took"+Str$(Timer/50)+" seconds!"
  43. Boom 
  44. While Mouse Key=0 : Wend